package tuhao.hibernate.www.serviceImpl.user;


import com.tuhao.www.domain.user.User;
import org.springframework.stereotype.Service;
import tuhao.hibernate.www.dao.BaseDao;
import tuhao.hibernate.www.dao.user.UserDao;
import tuhao.hibernate.www.service.user.UserService;
import tuhao.hibernate.www.serviceImpl.BaseServiceImpl;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;

@Service
//@Transactional(rollbackFor = Exception.class)
public class UserServiceImpl extends BaseServiceImpl<User> implements UserService {
    @Resource
    private UserDao userDao;

    @Override
    public BaseDao<User> getBaseDao() {
        return this.userDao;
    }

    @Override
    public User selectById(Long id) {
        return userDao.find(id);
    }

    @Override
    public User update1(String userName,Long id) {
        userDao.update1(userName,id);
       /* String s = null;
        s.indexOf("a");*/
        return null;
    }
}
